package top.wshape1.shiziapi.message.service;

import com.baomidou.mybatisplus.extension.service.IService;
import top.wshape1.shiziapi.message.domain.MessageBroadcast;
import top.wshape1.shiziapi.common.domain.vo.MessageVo;

import java.util.List;

/**
 * @author Wshape1
 * @description 针对表【t_message_broadcast】的数据库操作Service
 * @since 2023-09-18 22:09:06
 */
public interface MessageBroadcastService extends IService<MessageBroadcast> {

    /**
     * 已读某条广播信息
     *
     * @param msgId
     * @param userId
     */
    void read(Long msgId, Long userId);

    /**
     * 查询用户未读的广播信息数量
     *
     * @param userId
     * @return
     */
    long countUnread(Long userId);

    /**
     * 获取用户的通知消息
     *
     * @param userId
     * @return
     */
    List<MessageVo> getNotifyMsg(Long userId);
}
